home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / music / synth100.zip / SNTFMT.TXT < prev    next >
Text File  |  1994-10-27  |  6KB  |  144 lines

  1. SNT file format description
  2. Released with mcc Synthesizer Version 1.00
  3.  
  4. A .SNT file begins always with the string "mcc Synth x.xx" (with final NUL,
  5. 15 bytes total), with x.xx the version number of the mcc Synthesizer. When
  6. reading, synth.exe does not control the version number. It pretends only
  7. the "mcc Synth" signature. After that modules follow. Each module begins
  8. with 4 bytes (a long integer), where the most significant byte identifies
  9. the module type, the other three bytes contain the module length (the module
  10. id (the described 4 bytes) is not counted). These type of modules are defined:
  11.  
  12. ID 0 Length 0:
  13.         File terminator. Not necessary, but synth.exe puts it.
  14. ID 1 Length variable:
  15.         Text. You can put every text you want here (the module description,
  16.         copyright messages, ...). synth.exe simply ignores it.
  17. ID 2 Lenght 1248:
  18.         Sound bank. In given order:
  19.         12 * 31 bytes containing sound names (strings must terminate with NUL)
  20.         12 * 63 spectrum
  21.         12 * 8  ADSR pots (integers)
  22.         12 * 2  volume pots (integers)
  23. ID 3 Length 188899
  24.         Drum bank. In given order:
  25.         43 * 31   bytes containing drum names (strings must terminate with NUL)
  26.         43 * 256  spectrum
  27.         43 * 4096 sampled drums (spectrum converted to samples)
  28.         43 * 8    ADSR pots (integers)
  29.         43 * 2    volume pots (integers)
  30. ID 4 Length 104
  31.         Sound:
  32.         31 name
  33.         63 spectrum
  34.         8  ADSR
  35.         2  volume
  36. ID 5 Length 297
  37.         Drum:
  38.         31  name
  39.         256 spectrum
  40.         8   ADSR
  41.         2   volume
  42. ID 6 Lenght 41
  43.         Effect:
  44.         31 name
  45.         10 potentiometers
  46. ID 7 Length 11940
  47.         Rhythm bank:
  48.         12 * 2   rhythm potentiometers
  49.         12 * 31  names
  50.         12 * 2   number of passes (integer)
  51.         12 * 800 rhythm sequences
  52.         12 * 128 arrangements
  53.         12 * 32  LEDs
  54. ID 8 Length 995
  55.         Rhythm:
  56.         2   potentiometer
  57.         31  name
  58.         2   number of passes (integer)
  59.         800 rhythm sequence
  60.         128 arrangemet
  61.         32  LEDs
  62. ID 9 Length variable:
  63.         Song:
  64.         2      rhythm number (0 to 11)
  65.         2      rhythm potentiometer
  66.         13 * 2 track offsets (integers, the last represents last track end + 1)
  67.         12 * 2 buttons (0 disabled, 1 play, 5 rec)
  68.         2 * offset[12] event times
  69.         2 * offset[12] events
  70. ID 10 Length 4393
  71.         Drum (with included sample):
  72.         31   name
  73.         256  spectrum
  74.         8    ADSR
  75.         2    volume
  76.         4096 sample
  77.  
  78. IDs 11 - 127 reserved
  79. IDs 128 - 255 free
  80.  
  81. All the potentiometers are integers. Acceptable values are in the range
  82. 0 - 155.
  83.  
  84. ADSR pots are:
  85.         attack time: pot ^ 2 * 1000 / 11232 ms
  86.         release time: pot ^ 2 * 1000 / 11232 ms
  87.         sustain level: pot ^ 2 / 241 %
  88.         releases time: pot ^ 2 * 1000 / 11232 ms
  89. Effect pots are:
  90.         delay time: pot ^ 2 / 54 ms
  91.         delay level: pot ^ 2 / 246 %
  92.         delay return: pot ^ 2 / 246 %
  93.         delay modulation: pot ^ 2 / 246 %
  94.         modulation period: pot ^ 2 * 12 / 45 ms
  95. Volume pot is:
  96.         volume: pot / 1.56 %
  97. Rhythm pot is:
  98.         BPM: pot ^ 2 / 50 + 2
  99.  
  100. The sound spectrum is made of unsigned chars in the range 0 - 180. The scales
  101. (intensity and frequency) are linear.
  102. The drums spectrum is made of unsigned chars in the range 0 - 63. The
  103. intensity scale is linear, the frequency scale is linear in portions of 48
  104. frequencies. Every 48th frequency the scale doubles. To keep the ideas clear,
  105. here's the code that does the tranformation:
  106.         n = k = 1;
  107.         for(j = 1; j < 256; j++)
  108.         {
  109.           if(!(j% 48)) 
  110.           k *= 2;
  111.           for(i = 0; i < k; i++)
  112.             drum[n++] = spectrum[j] * (random(2000) - 1000);
  113.         }
  114.         4096 poits FFT follows.
  115.  
  116. What sampled is 8 bit signed char.
  117.  
  118. The drum bank has the sampled data, because 43 4096-points FFTs are too long
  119. to calculate and the user doesn't want to wait one minute for every drum bank
  120. load.
  121.  
  122. The rhythm sequence is a circular linked list of records containing four
  123. integers (in the given order): link to next node, time to next event, sound,
  124. note. Every pass is divided in 4 time units. Sounds go from 0 to 12, where 12
  125. means drum. The bit 7 of note is set for release, cleared for press. Note
  126. number 127 is ignored. If sound is 12 (drum), note contains the drum (0 - 42).
  127. If sound is in the range 0 - 11, note contains the semitone number, where 67
  128. is 440 Hz. Only 100 rhythm events are possible 800 / (2 * 4). Arrangement
  129. contains 4 sequences of 32 bytes, where each bit in the byte entry is used to
  130. determine, whether the note in the accord position corresponding to that bit
  131. will be played (if bit set). Bits 0 - 3 are actual accord positions, bits
  132. 4 - 7 play a note one octave higher. There are 4 sequences, the first for one
  133. key pressed, the second for two keys, and so on. For every pass there is a
  134. LED combination: 0 means first LED (red), 1 means the second (green), 2 the
  135. third (green), 3 the fourth (green) and 4 all the LEDs.
  136.  
  137. The time unit for the songs is four times more precise than that of the rhythm,
  138. so there are 16 units for rhythm pass. The timing in the song is absolute (in
  139. the rhythm the timing entries represent the time between events). The events
  140. are integers with the most significant byte containing the sound and the least
  141. significant byte containg note. The sounds and the notes are as in the rhythm
  142. case.
  143.  
  144.